package com.gxpt.app.adapter;

import android.content.Context;
import android.widget.ImageView;
import android.widget.TextView;

import com.gxpt.app.AppUtils;
import com.gxpt.app.Constant;
import com.gxpt.app.R;
import com.gxpt.app.base.ListBaseAdapter;
import com.gxpt.app.base.SuperViewHolder;
import com.gxpt.app.bean.fnewlist_bean;
import com.gxpt.app.bean.prolist_bean;
import com.utils.ScreenUtils;
import com.utils.picasso.PicassoUtils;

/**
 * Created by Lzx on 2016/12/30.
 */

public class prolist_Adapter extends ListBaseAdapter<prolist_bean.prolist> {

    //列表图片
    int pic_view_width = 0;
    int pic_view_hight = 0;
    Context context;
    public prolist_Adapter(Context context) {
        super(context);
        this.context = context;
//        int Sviewwidth  = ScreenUtils.getScreenWidth(context);//
//        pic_view_width  = (Sviewwidth- AppUtils.dip2px(context,10*2))/4;
//        pic_view_hight  = pic_view_width;

//        Logger.i("屏幕 = " + Sviewwidth);
//        Logger.i("宽 = " + pic_view_width);
//        Logger.i("高 = " + pic_view_hight);
    }

    @Override
    public int getLayoutId() {
        return R.layout.item_home_center_list;
    }

    @Override
    public void onBindItemHolder(SuperViewHolder holder, int position) {
        prolist_bean.prolist item = mDataList.get(position);

        TextView txt_title = holder.getView(R.id.txt_title);
        txt_title.setText(item.title);

        TextView txt_create_time = holder.getView(R.id.txt_create_time);
        txt_create_time.setText(item.create_time);

        TextView txt_shop_name = holder.getView(R.id.txt_shop_name);
        txt_shop_name.setText(item.shop_name);

        TextView txt_bid_status = holder.getView(R.id.txt_bid_status);
        txt_bid_status.setText(""+item.status_name);

    }
}
